package com.gugee.ins.common.dal.service.mark.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gugee.ins.common.dal.mapper.mark.InsRkBloggerFlMonthExtMapper;
import com.gugee.ins.common.dal.service.mark.InsRkBloggerFlMonthDao;
import com.gugee.ins.common.model.mysql.mark.InsRkBloggerFlMonth;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * insBlogger dao
 * @author Huangxin
 */
@Slf4j
@Service
public class InsRkBloggerFlMonthDaoImpl extends ServiceImpl<InsRkBloggerFlMonthExtMapper, InsRkBloggerFlMonth> implements InsRkBloggerFlMonthDao {
    /**
     * 月榜
     * @param lastDayOfRankMonth
     * @param rankMonth
     * @param lastRankMonth
     * @param nation
     * @param category
     */
    @Override
    public void insertRkBloggerFlMonth(int lastDayOfRankMonth,int rankMonth,int lastRankMonth,String nation,String category){
        long now = System.currentTimeMillis() / 1000;
        baseMapper.insertRkBloggerFlMonth(lastDayOfRankMonth,rankMonth,lastRankMonth,nation,category,now);
    }
    /**
     * 根据时间更新月榜的er和点赞
     * @param dateCode
     * @param limitTime
     */
    @Override
    public void updateErAndLike(int dateCode,long limitTime){
        baseMapper.updateErAndLike(dateCode,limitTime);
    }

}
